package cn.edu.dgut.sb.demo.controller;

import com.google.gson.Gson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    /**
     * 能注入就能用，可改了默认的json converter
     * 测试通不过，注释了，返回的json字符串 带 引号...
     */
    /*@Autowired
    private Gson gson;*/


    @RequestMapping(value = "/", produces = "application/json;charset=utf-8")
    public String index() {
        return "你好, Spring Boot";
    }
}
